﻿using AutoMapper;
using LXYYY.GoodsDTO;
using LXYYY.Models;
using LXYYY.OrderDTO;
using LXYYY.RBACDTO;
using LXYYY.UserDTO;

namespace LXYYY
{
    public class LXYYYApplicationAutoMapperProfile : Profile
    {
        public LXYYYApplicationAutoMapperProfile()
        {
            /* You can configure your AutoMapper mapping configuration here.
             * Alternatively, you can split your mapping configurations
             * into multiple profile classes for a better organization. */
            //图片表
            CreateMap<MyGoodsImg, MyGoodsImgShowDTO>();
            CreateMap<MyGoodsImgAddDTO, MyGoodsImg>();
            //商品信息表
            CreateMap<MyGoodsInformation, MyGoodsInformationShowDTO>();
            CreateMap<MyGoodsInformationAddDTO, MyGoodsInformation>();
            //商品库存表
            CreateMap<MyGoodsInventory, MyGoodsInventoryShowDTO>();
            CreateMap<MyGoodsInventoryAddDTO, MyGoodsInventory>();
            //商品规格表
            CreateMap<MyGoodsSpecifications, MyGoodsSpecificationsShowDTO>();
            CreateMap<MyGoodsSpecificationsAddDTO, MyGoodsSpecifications>();
            //商品类别表
            CreateMap<MyGoodsType, MyGoodsTypeShowDTO>();
            CreateMap<MyGoodsTypeAddDTO, MyGoodsType>();
            //用户地址表
            CreateMap<MyUserAddr, MyUserAddrShowDTO>();
            CreateMap<MyUserAddrAddDTO, MyUserAddr>();
            //消费表
            CreateMap<MyUserConsumption, MyUserConsumptionShowDTO>();
            CreateMap<MyUserConsumptionAddDTO, MyUserConsumption>();
            //用户(会员)信息表
            CreateMap<MyUserInformation, MyUserInformationShowDTO>();
            CreateMap<MyUserInformationAddDTO, MyUserInformation>();

            //会员表
            CreateMap<MyUserMembers, MyUserMembersShowDTO>();
            CreateMap<MyUserMembersAddDTO, MyUserMembers>();
            //支付信息表
            CreateMap<MyUserPay, MyUserPayShowDTO>();
            CreateMap<MyUserPayAddDTO, MyUserPay>();
            //权限菜单表

            CreateMap<Power, PowerShowDTO>();
            CreateMap<PowerAddDTO, Power>();
            //角色表
            CreateMap<Role, RoleShowDTO>();
            CreateMap<RoleAddDTO, Role>();
            //角色权限表RolePower
            CreateMap<RolePower, RolePowerShowDTO>();
            CreateMap<RolePowerAddDTO, RolePower>();
            //管理员表
            CreateMap<UserInfos, UserInfosShowDTO>();
            CreateMap<UserInfosAddDTO, UserInfos>();
            //用户角色表
            CreateMap<UserRole, UserRoleShowDTO>();
            CreateMap<UserRoleAddDTO, UserRole>();

            //收藏表
            CreateMap<Collection, CollectionShowDTO>();
            CreateMap<CollectionAddDTO, Collection>();
            //订单表
            CreateMap<OrderInfo, OrderInfoShowDTO>();
            CreateMap<OrderInfoAddDTO, OrderInfo>();
            //订单详情表
            CreateMap<OrderInfomation, OrderInfomationShowDTO>();
            CreateMap<OrderInfomationAddDTO, OrderInfomation>();
            //购物车表
            CreateMap<ShoppingCar, ShoppingCarShowDTO>();
            CreateMap<ShoppingCarAddDTO, ShoppingCar>();

        }
    }
}
